package jskj.ekt;

import jskj.ekt.api.dubbo.IDemoService;
import org.springframework.context.support.ClassPathXmlApplicationContext;

/**
 * 描述:
 * ${DESCRIPTION}
 *
 * @author JSKJ
 * @create 2019-01-02 13:05
 */
public class Main {
    public static void main(String[] args) throws Exception {
        ClassPathXmlApplicationContext context = new ClassPathXmlApplicationContext(new String[] {"/applicationContext.xml"});
        context.start();
        do {
            System.in.read(); // 按任意键继续
            IDemoService demoService = (IDemoService) context.getBean("demoService"); // 获取远程服务代理
            String hello = demoService.sayHello("world"); // 执行远程方法
            System.out.println(hello); // 显示调用结果
        }while (true);
    }
}
